package charts.series.pies ;

typedef DEFAULTPIESTRUCT = {
	var alpha		: Float;
	var start_angle		: Int;
	var label_color		: Dynamic;  // null means use color of the slice
	var font_size		: Dynamic;
	var gradient_fill	: Bool;
	var stroke		: Int;
	var colors		: Array<String>; // slices colors
	var animate		: Array<{type:String}>; // [{"type":"fade-in"}],
	var tip			: String; //'#val# of #total#',	// #percent#, #label#
	var onclickabels		: Bool;
	var onclick		: Dynamic;
};

class DefaultPieProperties extends Properties
{

	public function new (json:Dynamic) {
		// //tr.ace_json(json);
		
		// the user JSON can override any of these:
		var parent:Properties = new Properties( {
			alpha:				0.5,
			start_angle:		90,
			label_color:		null,  // null means use color of the slice
			font_size:		10,
			gradient_fill:	false,
			stroke:				1,
			colors:			["#900000", "#009000"],	// slices colors
			animate:			[{type:"fade-in"}],
			tip:				'#val# of #total#',	// #percent#, #label#
			onclickabels:		false,
			onclick:			null
			} );
			
			
			
		super( json, parent );
		
		//tr.aces('4', this.get('start-angle'));
		// //tr.aces('4', this.get('color'));
		// //tr.aces('4', this.get('type'));
	}
}
